
from pandas import DataFrame
from pandasql import sqldf, load_meat, load_births

if __name__ == '__main__':
    df1 = DataFrame({'name': ['ZhangFei', 'GuanYu', 'a', 'b', 'c'], 'data1': range(5)})
    pysqldf = lambda sql: sqldf(sql, globals())
    sql = "select * from df1 where name ='ZhangFei'"
    print(pysqldf(sql))

